/* 
 *  javascribd - Java client library for the Scribd API. 
 *  Copyright (C) 2009 by Marcel Eyke, http://code.google.com/p/javascribd/ 
 *  Use is subject to license terms of LGPLv3. See license.txt. 
 */
package com.google.code.javascribd.connection.jaxbadapter;

import javax.xml.bind.annotation.adapters.XmlAdapter;

import com.google.code.javascribd.type.SessionKey;

public class SessionKeyAdapter extends XmlAdapter<String, SessionKey> {

	@Override
	public String marshal(SessionKey sessionKey) throws Exception {
		return sessionKey.getSessionKey();
	}

	@Override
	public SessionKey unmarshal(String sessionKeyString) throws Exception {
		return new SessionKey(sessionKeyString);
	}

}
